
import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.Message.RecipientType;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import com.sun.mail.smtp.SMTPSSLTransport;

public class SendMailExample {
public static void main(String[] args) {

String from = "asoa0838@gmail.com";
String to = "anwara.ahmed@gmail.com";
String subject = "Test Message";
String message = "This is A test message sent via Gmail ";
SendMail sendMail = new SendMail(from, to, subject, message);
System.out.println("Mail has been sent to : " + to);
sendMail.send();
}
}
